'use strict';
var even_asc_odd_desc = function(collection){
    let temp_one=[];
    let temp_two=[];
    for(let i=0;i<collection.length;i++)
    {
        if(collection[i]%2==0)
            temp_one.push(collection[i]);
        else
            temp_two.push(collection[i]);
    }
    function sortnumber1(a,b)
    {
        return a-b
    }
    function sortnumber2(a,b)
    {
        return b-a;
    }
    temp_one.sort(sortnumber1);
    temp_two.sort(sortnumber2);
    for(let i=0;i<temp_two.length;i++)
        {
            temp_one.push(temp_two[i])
        }
    return temp_one;
};
module.exports = even_asc_odd_desc;
